package lab02.test23;
import java.util.Scanner;

import java.util.Calendar;

import java.util.GregorianCalendar;
/**
 * Created by 阿阿阿阿豪丶 on 2017/10/31.
 */
public class Test {

        public static void main(String[] args) {

            Calendar time =Calendar.getInstance();
            Calendar time1 = Calendar.getInstance();
            Scanner scan=new Scanner(System.in);

            int year,month,day;
            System.out.println("年:");
            year=scan.nextInt();

            System.out.println("月:");
            month=scan.nextInt();

            System.out.println("日:");
            day=scan.nextInt();

            time.set(year, month-1, day);
            int Day=time.get(GregorianCalendar.DAY_OF_WEEK);
            System.out.println("星期"+(Day-1));

            int birthday = time.get(Calendar.DAY_OF_YEAR) - 1;
            int nowtime = time1.get(GregorianCalendar.DAY_OF_YEAR);
            if(birthday < nowtime){
                System.out.println("还有" + (365-(nowtime - birthday))+"天");
            }else if (birthday > nowtime){
                System.out.println("还有" + (birthday - nowtime) + "天");
            }else {
                System.out.println("生日快乐");
            }

        }

    }

